1. Field of the Invention
The present invention relates to a storage controller and a method for controlling the storage controller.
2. Description of the Related Art
Storage controllers are coupled to, for example, host computers (each hereinafter referred to as a “host”) such as mainframes or servers. The storage controllers provide the hosts with storage areas based on Redundant Array of Inexpensive Disks (RAID).
In the storage controllers, it is possible, for example, to append redundancy to data as known as RAID1 through RAID6. The storage controllers append parity data to the data or write a copy of the data to another disk drive redundantly, thereby being prepared for a trouble of a disk drive.
Further, there is also known a storage controller using a security code (JP-A-2000-347815, U.S. Pat. Nos. 5,819,054 and 5,706,298). In one of the prior art references, the logical address (hereinafter referred to as an “LA”) of the logical block the host computer designates as an access destination and the Longitudinal Redundancy Check (LRC) obtained by executing an EXCLUSIVE-OR operation on the data in the logical block are appended to each logical block as the security code, and the security code and the logical block are stored in the disk drive.
The LA is used for detecting an error of the address of the storage area to which the data of the logical block is to be written. The LRC is used as an error detection code for detecting an error of the data of the logical block.
In the case in which the security code is appended to the logical block, there is a possibility that the management unit of the data handled in the storage controller and the management unit of the data in the disk drive are different form each other. For example, the disk drives having the block length (the sector length) fixed to be the size of the logical block such as Serial Advanced Technology Attachment (Serial ATA) disk drives store data by logical block of fixed value. Therefore, if the security code is appended to the logical block to increase the block size, it may not be allowed to store the security code-attached logical block as it is depending on the format of the disk drive.
Therefore, in order for solving this problem, JP-A-2006-195851 (a fourth document) proposes a technology of fixing the value, which is used when inputting and outputting data to and from the disk drive, to be the least common multiple of the size of the logical block and the size of the security code-attached logical block.